import request from '@/utils/request'

// 查询鹰眼监控信息列表
export function listHawkeye(query) {
  return request({
    url: '/oms/hawkeye/',
    method: 'get',
    params: query
  })
}

// 查询鹰眼监控信息详细
export function getHawkeye(id) {
  return request({
    url: `/oms/hawkeye/${id}/`,
    method: 'get'
  })
}

// 查询鹰眼监控详细历史
export function getHistory(id) {
  return request({
    url: `/oms/hawkeye/${id}/history/`,
    method: 'get',
  })
}

// 新增鹰眼监控信息
export function addHawkeye(data) {
  return request({
    url: '/oms/hawkeye/',
    method: 'post',
    data: data
  })
}

// 修改鹰眼监控信息
export function updateHawkeye(data) {
  return request({
    url: `/oms/hawkeye/${data.id}/`,
    method: 'put',
    data: data
  })
}

// 删除鹰眼监控信息
export function delHawkeye(id) {
  return request({
    url: `/oms/hawkeye/${id}/`,
    method: 'delete'
  })
}

// 清空鹰眼监控信息
export function cleanHawkeye() {
  return request({
    url: '/sys/hawkeye/clean/',
    method: 'delete'
  })
}